/**
 * 
 */
package t4j.typeinfo;

import t4j.typeinfo.interfacea.A;


class B implements A{

	public void f() {}
	
	public void g(){}
}

public class InterfaceViolation {
	public static void main(String[] args) {
		
		A a = new B();
		
		a.f();
		
		System.out.println(a.getClass().getName());
		
		if(a instanceof B){
			B b = (B)a;//接口被向下转型了
			
			b.g();
		}
	}
	
	
}
